import { PageParams, Status } from './../../models/sys'
import { http } from '@/utils/http'
import { TaskUpdates, TodoPagination } from '@/models/task'

/** 完成代办 */
export const taskDone = (params: { id: number; status: Status }) => {
  return http.post('/library-client/api/wxwork/task/done', params)
}

/** 列表 */
export const getTaskList = (params: PageParams) => {
  return http.get<TodoPagination>('/library-client/api/wxwork/task/list', params)
}

/** 检查最新的数据 */
export const checkLatestTask = (params?: { start_id: number; latest_id: number }) => {
  return http.get<TaskUpdates>('/library-client/api/wxwork/task/latest', params)
}
